package model.mapping;

import java.io.Serializable;

import model.Model;

public class Crossing implements Serializable {

	private int type;
	private TrafficLight trafficLight;
	
	public Crossing(int type) {
		
		this.type = type;
		if (type == Model.Crossings.TRAFFICLIGHT.ordinal() ||
			type == Model.Crossings.TRAFFICLIGHTANDZEBRA.ordinal())
			trafficLight = new TrafficLight();
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public TrafficLight getTrafficLight() {
		return trafficLight;
	}

	public void setTrafficLight(TrafficLight trafficLight) {
		this.trafficLight = trafficLight;
	}
}
